package cn.schoolwow.quickdao.module.initial.service;

import cn.schoolwow.quickdao.module.initial.flow.datasource.CreateDatabaseFlow;
import cn.schoolwow.quickdao.module.initial.flow.datasource.InitialQuickDAOConfigDataSourceFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class InitialDataSourceCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new CreateDatabaseFlow())
                .next(new InitialQuickDAOConfigDataSourceFlow());
    }

    @Override
    public String name() {
        return "初始化数据库连接池";
    }

}
